from django.conf.urls import url
from rest_framework import routers
from rest_framework_jwt.views import obtain_jwt_token

from . import views

urlpatterns = [
    url(r'^usernames/(?P<username>\w{5,20})/count/$', views.UsernameCountView.as_view()),
    url(r'users/', views.UserView.as_view()),
    url(r'^authorizations/$', views.UserAuthorizeView.as_view()),
    url(r'^user/$', views.UserDetailView.as_view()),
    url(r'^email/$', views.EmailView.as_view()),
    url(r'^email/verification/$', views.VerifyEmailView.as_view()),
    url(r'^change_password/$', views.ChangePasswordViewSet.as_view()),
    url(r'^browse_histories/$', views.BrowseHistoryView.as_view()),
]

router = routers.DefaultRouter()
router.register(r'areas', views.AreaViewSet)
router.register(r'addresses', views.AddressViewSet)
urlpatterns += router.urls
